<?php

require_once( ORM_DIR.'/extractors/Extractor.php' );

class StoredObjectDescriptor {
		
	private $_className;
	
	private $_tableName;	
	
	private $_primaryKeyName;
	
	private $_fields;
	
	private $_extractors;
	
	public function __construct( $className, $tableName, $primaryKeyName, array $fields, array $extractors ) {
		$this->_className = $className;
		$this->_tableName = $tableName;
		$this->_primaryKeyName = $primaryKeyName;		
		$this->_extractors = $extractors;
		$this->_fields = array();
		
		foreach ( $fields as $fieldName ) {
			$this->_fields[ $fieldName ] = '';
		}
	}
	
	public function getClassName() {
		return $this->_className;
	}
	
	public function getTableName() {
		return $this->_tableName;
	}
	
	public function getPrimaryKeyName() {
		return $this->_primaryKeyName;
	}
	
	public function getFields() {
		return $this->_fields;
	}
	
	public function getExtractors() {
		return $this->_extractors;
	}
	
	public function createObject() {
		return new $this->_className;
	}
}

?>